<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="修改汇款信息" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-remittance-edit"  class="form-horizontal">
    <input name="id" value="${bpmCrmRemittance.id}" type="hidden">
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "销售员" />：                               <i class="fa fa-question-circle-o" title="销售员"></i>                                
       </label>
        <div class="col-sm-8"><input name="saleUserid" value="${bpmCrmRemittance.saleUserid?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "销售订单编号" />：                               <i class="fa fa-question-circle-o" title="销售订单编号"></i>                                
       </label>
        <div class="col-sm-8"><input name="saleOrderNumber" value="${bpmCrmRemittance.saleOrderNumber?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "车辆识别号" />：                               <i class="fa fa-question-circle-o" title="车辆识别号"></i>                                
       </label>
        <div class="col-sm-8"><input name="outCarVin" value="${bpmCrmRemittance.outCarVin?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "车型" />：                               <i class="fa fa-question-circle-o" title="车型"></i>                                
       </label>
        <div class="col-sm-8"><input name="outCarVehicle" value="${bpmCrmRemittance.outCarVehicle?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "费用发生日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="remittanceCostTime"  data-type="date"   value="${(bpmCrmRemittance.remittanceCostTime?string('yyyy-MM-dd'))!}" data-format="yyyy-MM-dd" type="text"  required/>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "报销金额" />：                               <i class="fa fa-question-circle-o" title="汇款-报销金额"></i>                                
       </label>
        <div class="col-sm-8"><input name="remittancereimburseAmount" value="${bpmCrmRemittance.remittancereimburseAmount?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "凭证" />：                               <i class="fa fa-question-circle-o" title="汇款-凭证"></i>                                
       </label>
        <div class="col-sm-8"><input name="remittanceVoucherFilepath" value="${bpmCrmRemittance.remittanceVoucherFilepath?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备注" />：                               <i class="fa fa-question-circle-o" title="汇款-备注"></i>                                
       </label>
        <div class="col-sm-8"><input name="remittanceRemark" value="${bpmCrmRemittance.remittanceRemark?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "首选付款方式"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="remittanceFirstPaymethod" dictType="sys_crm_paymethod" value="${bpmCrmRemittance.remittanceFirstPaymethod?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="remittanceMemo" class="form-control" required>${bpmCrmRemittance.remittanceMemo?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group checkClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人姓名" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRecipientName" value="${bpmCrmRemittance.remittanceRecipientName?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group checkClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人地址" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRecipientAddress" value="${bpmCrmRemittance.remittanceRecipientAddress?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group checkClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人手机" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRecipientPhone" value="${bpmCrmRemittance.remittanceRecipientPhone?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group wireClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "金额" />：
       </label>
        <div class="col-sm-8"><input name="remittanceAccount" value="${bpmCrmRemittance.remittanceAccount?default("")}" class="form-control" type="number" required>
        </div>
     </div>
    <div class="form-group wireClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "汇款路径号码" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRouting" value="${bpmCrmRemittance.remittanceRouting?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group wireClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "银行地址" />：
       </label>
        <div class="col-sm-8"><input name="remittanceBankaddress" value="${bpmCrmRemittance.remittanceBankaddress?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group rmbClass">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "人民币汇款"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="remittanceRmbPaymethod" dictType="sys_crm_isOrNo" value="${bpmCrmRemittance.remittanceRmbPaymethod?default('')}" />
        </div>

    </div>
    <div class="form-group rmbClassMoney">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "银行名称" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRmbBankname" value="${bpmCrmRemittance.remittanceRmbBankname?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group rmbClassMoney">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "银行账户" />：
       </label>
        <div class="col-sm-8"><input name="remittanceRmbBankaccount" value="${bpmCrmRemittance.remittanceRmbBankaccount?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group rmbClassMoney">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "账户备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="remittanceRmbAccountname" class="form-control"required>${bpmCrmRemittance.remittanceRmbAccountname?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "审批金额" />：                               <i class="fa fa-question-circle-o" title="审批-审批金额 默认值=报销金额"></i>                                
       </label>
        <div class="col-sm-8"><input name="approvalAmount" value="${bpmCrmRemittance.approvalAmount?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳审批"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="approvalCashier" dictType="sys_bpm_crm_passorclose" value="${bpmCrmRemittance.approvalCashier?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="approvalCashierRemark" class="form-control" required>${bpmCrmRemittance.approvalCashierRemark?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "比例" />：                               <i class="fa fa-question-circle-o" title="报销-比例"></i>                                
       </label>
        <div class="col-sm-8"><input name="reimburseProportion" value="${bpmCrmRemittance.reimburseProportion?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "金额" />：                               <i class="fa fa-question-circle-o" title="报销-金额"></i>                                
       </label>
        <div class="col-sm-8"><input name="reimburseAmount" value="${bpmCrmRemittance.reimburseAmount?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理审批"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="reimburseFinanceapproval" dictType="sys_bpm_crm_passorclose" value="${bpmCrmRemittance.reimburseFinanceapproval?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="reimburseFinanceremark" class="form-control" required>${bpmCrmRemittance.reimburseFinanceremark?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="payTime"  data-type="date"   value="${(bpmCrmRemittance.payTime?string('yyyy-MM-dd'))!}" data-format="yyyy-MM-dd" type="text"  required/>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "付款记录" />：                               <i class="fa fa-question-circle-o" title="付款记录注：RMBCashCheckWire TransferZellepay"></i>                                
       </label>
        <div class="col-sm-8"><input name="payMethod" value="${bpmCrmRemittance.payMethod?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "附件" />：                               <i class="fa fa-question-circle-o" title="付款记录-附件"></i>                                
       </label>
        <div class="col-sm-8"><input name="payProofFilepath" value="${bpmCrmRemittance.payProofFilepath?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "接收人号码" />：                               <i class="fa fa-question-circle-o" title="付款记录-接收人号码"></i>                                
       </label>
        <div class="col-sm-8"><input name="payReceiptNumber" value="${bpmCrmRemittance.payReceiptNumber?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备忘录" />：                               <i class="fa fa-question-circle-o" title="付款记录-备忘录"></i>                                
       </label>
        <div class="col-sm-8"><input name="payMemo" value="${bpmCrmRemittance.payMemo?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "结果"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="cashierResult" dictType="sys_bpm_crm_passorclose" value="${bpmCrmRemittance.cashierResult?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "金额" />：                               <i class="fa fa-question-circle-o" title="付款记录-金额"></i>                                
       </label>
        <div class="col-sm-8"><input name="cashierAmount" value="${bpmCrmRemittance.cashierAmount?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="cashierMemo" class="form-control" required>${bpmCrmRemittance.cashierMemo?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "付款总额" />：                               <i class="fa fa-question-circle-o" title="付款记录-付款总额"></i>                                
       </label>
        <div class="col-sm-8"><input name="cashierPaysumamount" value="${bpmCrmRemittance.cashierPaysumamount?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "备忘录"/>：</label>
        <div class="col-sm-8">
            <textarea name="memo" class="form-control" required>${bpmCrmRemittance.memo?default("")}</textarea>
        </div>
    </div>
               
</@form.form>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bpm/remittance";
    $("#form-remittance-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/edit", $('#form-remittance-edit').serialize());
        }
    }
    /**
     * redio 单选回调
     * @param id
     * @param data
     * @param event
     */
    function  redioCallback(id,data,event){
        if(id == "remittanceFirstPaymethod"){
            if ($(data).is(':checked')){
                var menuType = $(event.target).val();
                if(menuType=="0"){
                    $(".rmbClass").show();
                    $(".wireClass").hide();
                    $(".checkClass").hide();
                    var rmbStatus=$("[name='remittanceRmbPaymethod']")[0].checked;
                    if(rmbStatus){
                        $(".rmbClassMoney").show();
                    }
                    else{
                        $(".rmbClassMoney").hide();
                    }
                }
                else if(menuType=="1"){
                    $(".rmbClass").hide();
                    $(".wireClass").hide();
                    $(".checkClass").hide();
                    $(".rmbClassMoney").hide();
                }
                else if(menuType=="2"){
                    $(".rmbClass").hide();
                    $(".wireClass").hide();
                    $(".checkClass").show();
                    $(".rmbClassMoney").hide();
                }
                else if(menuType=="3"){
                    $(".rmbClass").hide();
                    $(".wireClass").show();
                    $(".checkClass").show();
                    $(".rmbClassMoney").hide();
                }
            }
        }
        else if(id == "remittanceRmbPaymethod"){
            if ($(data).is(':checked')){
                var valueType = $(event.target).val();
                if(valueType=="1"){
                    $(".rmbClassMoney").show();
                }
                else{
                    $(".rmbClassMoney").hide();
                }
            }
        }
    }
</script>
</@footer>
</@pageTheme>
